package mylab.io.store.mqtt.client;

import mylab.base.foundation.lang.Callback;
import mylab.io.store.mqtt.common.MqttMsg;
import mylab.io.store.mqtt.common.MqttQoS;

public interface MqttSubscriber {

    default void subscribe(String topic, Callback<MqttMsg> callback) {
        subscribe(topic, MqttQoS.AT_LEAST_ONCE, callback);
    }

    void subscribe(String topic, MqttQoS qoS, Callback<MqttMsg> callback);

    void unsubscribe(String topic, Callback<Void> callback);
}
